import socket
#创建UDP套接字
udp_socket = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
udp_socket.bind(('',8083)) # 绑定本地的ip地址
mess = udp_socket.recvfrom(1024)
print(mess[0].decode('utf-8'),mess[1])
mess_addr = mess[1]
mess = input('输入')
udp_socket.sendto(mess.encode('utf-8'),mess_addr)
udp_socket.close()